package game.worlds;

import game.data.AttackType;
import hx.display.BitmapLabel;

/**
 * 伤害显示组件
 */
class HurtDisplay extends BitmapLabel {
	public function new(hurt:Int, type:AttackType):Void {
		var style = switch (type) {
			case NORMAL:
				"hurt_number";
			case MAGIC:
				"hurt_number2";
			default:
				"hurt_number";
		}
		super(GameWorld.currentWorld.gameAssets.getAtlas(style));
		this.data = Std.string(hurt);
	}
}
